{"ast":null,"code":"import apiClient from \"../http\";\nimport { acceptContact, addContact, deleteContact, getContacts } from \"../routes\";\nexport default class ContactService {\n  static async getContacts() {\n    return apiClient.get(getContacts());\n  }\n  static async addContact(otherUserId) {\n    return apiClient.get(addContact(otherUserId));\n  }\n  static async acceptContact(contactId) {\n    return apiClient.put(acceptContact(contactId));\n  }\n  static async deleteContact(contactId) {\n    return apiClient.delete(deleteContact(contactId));\n  }\n}","map":{"version":3,"names":["apiClient","acceptContact","addContact","deleteContact","getContacts","ContactService","get","otherUserId","contactId","put","delete"],"sources":["/data/messenger.client/src/services/ContactService.ts"],"sourcesContent":["import apiClient from \"../http\";\nimport {AxiosResponse} from 'axios';\nimport {acceptContact, addContact, deleteContact, getContacts} from \"../routes\"\nimport {ContactListResponse} from \"../models/response/ContactListResponse\";\nimport {ContactListItem} from \"../models/response/ContactListItem\";\nimport {DeleteContactResponse} from \"../models/response/Other/DeleteContactResponse\";\n\nexport default class ContactService {\n    public static async getContacts(): Promise<AxiosResponse<ContactListResponse>> {\n        return apiClient.get<ContactListResponse>(getContacts());\n    }\n\n    public static async addContact(otherUserId: string): Promise<AxiosResponse<ContactListItem>> {\n        return apiClient.get<ContactListItem>(addContact(otherUserId));\n    }\n\n    public static async acceptContact(contactId: string): Promise<AxiosResponse<ContactListItem>> {\n        return apiClient.put<ContactListItem>(acceptContact(contactId));\n    }\n\n    public static async deleteContact(contactId: string): Promise<AxiosResponse<DeleteContactResponse>> {\n        return apiClient.delete<DeleteContactResponse>(deleteContact(contactId));\n    }\n}"],"mappings":"AAAA,OAAOA,SAAS,MAAM,SAAS;AAE/B,SAAQC,aAAa,EAAEC,UAAU,EAAEC,aAAa,EAAEC,WAAW,QAAO,WAAW;AAK/E,eAAe,MAAMC,cAAc,CAAC;EAChC,aAAoBD,WAAW,GAAgD;IAC3E,OAAOJ,SAAS,CAACM,GAAG,CAAsBF,WAAW,EAAE,CAAC;EAC5D;EAEA,aAAoBF,UAAU,CAACK,WAAmB,EAA2C;IACzF,OAAOP,SAAS,CAACM,GAAG,CAAkBJ,UAAU,CAACK,WAAW,CAAC,CAAC;EAClE;EAEA,aAAoBN,aAAa,CAACO,SAAiB,EAA2C;IAC1F,OAAOR,SAAS,CAACS,GAAG,CAAkBR,aAAa,CAACO,SAAS,CAAC,CAAC;EACnE;EAEA,aAAoBL,aAAa,CAACK,SAAiB,EAAiD;IAChG,OAAOR,SAAS,CAACU,MAAM,CAAwBP,aAAa,CAACK,SAAS,CAAC,CAAC;EAC5E;AACJ"},"metadata":{},"sourceType":"module"}